// 可接受第二个参数
let arrayIndex = [1, 5, 10, 15].findIndex(function(value, index, arr) {
    return value > 9;
});
console.log(arrayIndex);

// 拟补indexOf()不足
let nanOf = [NaN].indexOf(NaN);
console.log(nanOf);

let nanOfs = [NaN].findIndex(y => Object.is(NaN, y));
console.log(nanOfs);